package com.su.lightthings.base

import android.os.Bundle
import androidx.viewbinding.ViewBinding

abstract class ViewActivity<T : ViewBinding> : NetStateActivity() {

    private lateinit var _binding: T
    protected val binding get() = _binding;

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        splashScreen()
        _binding = getViewBinding()
        setContentView(_binding.root)

        initViews()
        initEvents()
    }
    protected abstract fun getViewBinding(): T
    open fun splashScreen() {}
    open fun initViews() {}
    open fun initEvents() {}
}
